package com.mask.thread.pk04;

/**
 * @author hx
 * @since 2021/12/2 2:51 下午
 */

public class Test {
    public static ThreadLocal threadLocal = new ThreadLocal<>();

    public static void main(String[] args) {
        if (threadLocal.get() == null) {
            System.out.println("当前线程没有保留线程变量");
            threadLocal.set("线程变量");
        }


        System.out.println(threadLocal.get());

    }
}
